﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JuneMy12._5project
{
    class Program
    {
        static void Main(string[] args)
        {
            //Queue 队列
            //1
            Queue queue = new Queue();

            queue.Enqueue("梨花");

            queue.Enqueue("小明");

            queue.Enqueue(123);

            queue.Enqueue("qwert");

          /*  while (queue.Count != 0)
            {
                var item = queue.Dequeue();
                Console.WriteLine(item );
            }*/
            //2
            var arr3 = queue.ToArray();
            foreach(var a in arr3)
            {
                Console.WriteLine(a );
            }
            //3

            var aentor = queue.GetEnumerator();
            while (aentor.MoveNext())
            {
                Console.WriteLine(aentor.Current);
            }
        }
    }
}
